package com.huohua.jobschduler.api;

import com.huohua.jobschduler.model.po.JobNode;
import com.huohua.jobschduler.model.po.Result;
import com.huohua.jobschduler.service.JobSchdulerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author cyf
 * @version 1.0
 * @description jobAPI
 * @date 2024/10/13 21:46
 **/
@Api(value = "job接口",tags = "job接口")
@RestController
public class JobController {
    @Resource
    private JobSchdulerService jobSchdulerService;

    @ApiOperation("job接口")
    @GetMapping("/{jobId}")
    public Result test(@PathVariable String jobId) {
        return jobSchdulerService.jobSchdulerProcess(jobId);
    }
}
